(define (make-interval a b)
    (cons a b)
)
(define (lower-bound z)
    (car z)
)
(define (upper-bound z)
    (cdr z)
)

(define (print-interval x)
    (newline)
    (display "[")
    (display (lower-bound x))
    (display ",")
    (display (upper-bound x))
    (display "]")
)

(define (make-center-percent c p)
    (let (
            (w (/ (* c p) 100))
        )
        (make-interval 
            (- c w)
            (+ c w)
        )
    )
)
(define (center i)
    (/ (+ (lower-bound i) (upper-bound i)) 2)
)
(define (percent i)
    (* 100
        (/ (- (upper-bound i) (lower-bound i))  
            (* 2 (center i))
        ) 
    )
)
(define interval_1 
    (make-center-percent 1000 2)
)
(display (center interval_1))
(newline)
(display (percent interval_1))
(exit)